package com.naiterui.ehp.bs.b2c.product.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Version;

import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <pre>
 *      基础分类表
 * </pre>
 *
 * @author 王泽浩
 * @date 2019-06-14 20:06
 * @since 1.0.0
 */
@SuppressWarnings("unused")
@Entity
@Data
@NoArgsConstructor
@Table(name = "p_classification")
public class Classification implements java.io.Serializable {

    private static final long serialVersionUID = -3367041811367948196L;
    /**
     * 主键
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id", nullable = false)
    private Long id;

    /**
     * 分类名
     */
    @Column(name = "name", nullable = false)
    private String name;

    /**
     * 类型：1 药理分类，2型剂分类， 3药品分类
     */
    @Column(name = "type", nullable = false)
    private Integer type;

    /**
     * 排序
     */
    @Column(name = "order_num", nullable = false)
    private Integer orderNum;

    /**
     * 编码
     */
    @Column(name = "code")
    private String code;

    /**
     * 创建时间
     */
    @Column(name = "created_at", nullable = false)
    private Date createdAt;

    /**
     * 创建人
     */
    @Column(name = "created_by", nullable = false)
    private String createdBy;

    /**
     * 修改人
     */
    @Column(name = "changed_by", nullable = false)
    private String changedBy;

    /**
     * 修改时间
     */
    @Column(name = "changed_at", nullable = false)
    private Date changedAt;

    /**
     * 乐观锁
     */
    @Version
    @Column(name = "version", nullable = false)
    private Integer version;

}
